<%@page import="com.jcz.bizImpl.AuctionBizImpl"%>
<%@page import="com.jcz.biz.AuctionBiz"%>
<%@page import="com.jcz.entity.Page"%>
<%@page import="com.jcz.entity.Auction"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="/struts-tags" prefix="s"%>>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>拍卖品管理</title>
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
</head>

<body>
<script type="text/javascript">
		function doSearch(index1) {
			document.getElementById("index").value=index1;
			document.getElementById("sform").submit();
		}
	</script>
	
<form action=page.action method="post" id="sform">
<input type="hidden" name="pageIndex" id="index"/>
<div class="wrap">
<!-- main begin-->
  <div class="sale">
    <h1 class="lf">在线拍卖系统</h1>
    <div class="logout right"><a href="#" title="注销">注销</a></div>
  </div>
  <div class="forms">
    <label for="name">名称</label>
    <input name="auction.c_cname" type="text" class="nwinput" id="name" value="${auction.c_cname }"/>
    <label for="names">描述</label>
    <input name="auction.describe" type="text" id="names" class="nwinput" value="${auction.describe }"/>
    <label for="time">开始时间</label>
    <input type="text" class="Wdate" id="start" name="auction.starttime"
  	onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="21"
  	value="${auction.starttime }" />
    <label for="end-time">结束时间</label>
    <input type="text" class="Wdate" id="end" name="auction.endtime"
  	onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="21"
  	value="${auction.endtime }" />
    <label for="price">起拍价</label>
    <input name="auction.startprice" type="text" id="price" class="nwinput" value="${auction.startprice }"/>
    <input name="" type="button"  value="查询" onclick=doSearch(1) class="spbg buttombg f14  sale-buttom"/>
    <input type="button"  value="发布" onclick="javascript:window.location.href='add.jsp';" class="spbg buttombg f14  sale-buttom buttomb"/>
  </div>
  <div class="items">
      <ul class="rows even strong">
        <li>名称</li>
        <li class="list-wd">描述</li>
        <li>开始时间</li>
        <li>结束时间</li>
        <li>起拍价</li>
        <li class="borderno">操作</li>
      </ul>
      <s:iterator value="page.list" var="auction" >
      <ul class="rows">
        <li><a href="国书" title=""><s:property value="#auction.c_cname"></s:property></a></li>
        <li class="list-wd"><s:property value="#auction.describe"></s:property></li>
        <li><s:property value="#auction.starttime"></s:property></li>
        <li><s:property value="#auction.endtime"></s:property></li>
        <li><s:property value="#auction.startprice"></s:property></li>
        <li class="borderno red">
           <a href="first.action?id=${auction.c_id }" title="竞拍" onclick="dele();">修改</a>|
          <a href="del.action" title="竞拍" onclick="abc();">删除</a>
        </li>
      </ul>     
      </s:iterator>
      <div class="page">
      <c:if test="${page.pageIndex>1}">
        <a href="javascript:void(0);" onclick="doSearch(1)">首页</a>
        <a href="javascript:void(0);" onclick="doSearch(${page.pageIndex-1})">上一页</a>
      </c:if>
        <span class="red">前5页</span>
        <a href="#" title="">1</a> 
        <a href="#" title="">2</a> 
        <a href="#" title="">3</a> 
        <a href="#" title="">4</a>
        <a href="#" title="">5</a> 
      <c:if test="${page.pageIndex<page.pageCount}">
        <a href="javascript:void(0);" onclick="doSearch(${page.pageIndex+1})">下一页</a>
        <a href="javascript:void(0);" onclick="doSearch(${page.pageCount})">尾页</a> 
      </c:if>
      </div>
  </div>
  <script>
   function abc(){
	   
	   if(confirm("你真的确认要删除吗？请确认")){

		   return true;
		 }
		 else{
			 return false;
			 }
			 
	   };
	   function dele(){
		   if(confirm("你真的确认要修改吗？请确认")){
			   return true;
			   }
			   else{
				   return false;
				   }
		   }
  </script>
<!-- main end-->
</div>
</form>
</body>
</html>
